# coding: utf-8
# create by tongshiwei on 2018/12/5
from Graph.Graph import Graph


class Agent(object):
    def __init__(self, graph):
        """

        Parameters
        ----------
        graph: Graph
        """
        self.graph = graph
        self.path = None

    def begin_episode(self, *args, **kwargs):
        raise NotImplementedError

    def step(self, *args, **kwargs):
        raise NotImplementedError

    def end_episode(self, *args, **kwargs):
        raise NotImplementedError

    def state_transform(self, action, correct, add_to_path=True, *args, **kwargs):
        raise NotImplementedError

    def is_terminal_action(self, action):
        return False

    @staticmethod
    def rewards(reward_values):
        return reward_values
